<!--
 * @Author: your name
 * @Date: 2021-08-03 13:36:05
 * @LastEditTime: 2021-08-12 13:26:42
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \getHome (2)\src\components\discounts\amend.vue
-->
<!--关联账单-->

<template>
  <div>
    <div class="herdertop">
      <img src="../../assets/top.png" alt="" class="topImg" />
      <el-breadcrumb separator="/">
        <el-breadcrumb-item>关联账单</el-breadcrumb-item>
        <el-breadcrumb-item>关联账单</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <div class="center">
      <div class="hander">关联账单</div>

      <!--  关联账单列表栏位-->

      <div class="entirety">
        <el-table :data="tableData" style="width: 100%">
          <el-table-column prop="orderNo" label="支付单号">
            <template slot-scope="scope">
              <div>
                {{ scope.row.orderNo }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="totalFee" label="账单金额">
            <template slot-scope="scope">
              <div>
                {{ scope.row.totalFee }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="payAmount" label="实付金额">
            <template slot-scope="scope">
              <div>
                {{ scope.row.payAmount }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="paymentMethod" label="支付方式">
            <template slot-scope="scope">
              <div>
                {{
                  scope.row.paymentMethod === "1"
                    ? "微信"
                    : scope.row.paymentMethod === "2"
                    ? "支付宝"
                    : scope.row.paymentMethod === "3"
                    ? "云闪付"
                    : "快捷支付"
                }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="platformType" label="支付终端">
            <template slot-scope="scope">
              <div>
                {{ scope.row.platformType }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="paymentTime" label="支付时间">
            <template slot-scope="scope">
              <div>
                {{ scope.row.paymentTime }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="subRgName" label="城市">
            <template slot-scope="scope">
              <div>
                {{ scope.row.subRgName }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="communityName" label="小区名称">
            <template slot-scope="scope">
              <div>
                {{ scope.row.communityName }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="houseCode" label="房间号">
            <template slot-scope="scope">
              <div>
                {{ scope.row.houseCode }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="houseCode" label="业主姓名">
            <template slot-scope="scope">
              <div>
                {{ scope.row.userName }}
              </div>
            </template>
          </el-table-column>
        </el-table>
        <div class="block">
          <div class="left"></div>
          <div class="right">
            <el-pagination
              layout="total, sizes, prev, pager, next, jumper"
              class="page"
              @size-change="sizeChangeHandle"
              @current-change="currentChangeHandle"
              :current-page="pageIndex"
              :page-size="pageSize"
              :total="total"
            >
            </el-pagination>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      memberNo: "",
      pageIndex: 1,
      pageSize: 20,
      total: 0,
      tableData: [],
      id: "",
      userSearch: 0
    };
  },
  activated() {
    this.memberNo = this.$route.params.memberNo || "";
    this.memberNo = this.$route.params.memberNo || "";
    this.pageIndex = 1;
    this.pageSize = 20;

    this.DetailByPage();
  },
  methods: {
    //分页获取优惠券模板列表接口调用
    DetailByPage() {
      this.$http({
        url: `/billadmin/order/paymentManager/fetchPaymentListDetail`,
        method: "GET",
        params: {
          memberNo: this.memberNo,
          page: this.pageIndex,
          size: this.pageSize
        }
      }).then(res => {
        this.tableData = res.data.list;

        this.total = parseInt(res.data.total);
      });
    },

    // 每页数
    sizeChangeHandle(val) {
      this.pageSize = val;
      this.pageIndex = 1;

      this.DetailByPage();
    },
    // 当前页
    currentChangeHandle(val) {
      this.pageIndex = val;

      this.DetailByPage();
    }
  }
};
</script>
<style scoped lang="scss">
.block {
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  padding: 0 10px 0 10px;
}
.left {
  font-size: 15px;
}
.hander {
  width: 100%;
  height: 50px;
  line-height: 50px;
  font-size: 20px;
  font-weight: 900;
}
.news {
  margin-left: 4%;
}
.entirety {
  width: 95%;
  margin: 10px;
  border: 7px solid #fafafa;
  border-radius: 10px;
  .basic {
    font-size: 18px;
    font-weight: 900;
    margin-top: 2%;
    margin-bottom: 1%;

    margin-left: 1%;
  }
}

.overall {
  width: 100%;
  height: auto;
  display: flex;

  justify-content: space-between;
  margin-top: 3%;
  .left {
    width: 20%;
    height: auto;
  }
  .right {
    width: 80%;
    height: auto;
  }
}
.demo-input-suffix {
  margin-left: 1%;
}
.select {
  width: 65%;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .dialog-footer,
  .choice {
    margin-left: 2%;
  }
}
.herdertop {
  height: 8vh;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}
.topImg {
  margin-right: 20px;
}
/deep/ .itemClass .el-form-item__content {
  width: 350px;
}
.userSearch {
  display: flex;
  /deep/ .el-input__inner {
    box-sizing: border-box;
    height: 40px;
    border-radius: 0;
    width: 132px;
    border: 1px solid #dcdfe6;
  }
  /deep/ .el-icon-arrow-up:before {
    position: relative;
    top: -4px;
  }
  /deep/ .el-button {
    height: 40px;
    border-radius: 0;
    background-color: #fff;
    border: 1px solid #dcdfe6;
    border-left: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    position: relative;
    .el-icon-search {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }
  }
  /deep/ .el-input--suffix .el-input__inner {
    border-right: none;
  }
  /deep/ .el-input--suffix .el-input__inner {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
  }
}
.selects {
  width: 55%;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .dialog-footer,
  .choice {
    margin-left: 2%;
  }
}

/deep/ .but {
  background: #fd7097;
  color: #fff;
  margin-bottom: 1%;
}
</style>
